import { Component, OnInit } from '@angular/core';

@Component({
    selector: 'qn-home',
    templateUrl: 'home.component.html',
    styleUrls: [
        'home.component.css'
    ]
})

export class HomeComponent {
    slides: Array<any> = [];
    slogan: Array<any> = [
        '2',
        '3',
        '1',
    ];

    constructor() {
        for (let i = 0; i < 3; i++) {
            this.addSlide(i);
        }
     }

    addSlide(id: number) {
        this.slides.push({
            image: `./assets/images/home/banner_0${id + 1 }.jpg`,
            content: this.slogan[id]
        });
    }

}
